You are free to use all or any parts of the Locus project
however you wish, just give credit where credit is due.
The author (Jeremy Slade) shall not be held responsible
for any damages that result out of use or misuse of any
part of this project.
*/
/*
Project: Locus
File: Locus_main
Description:
This file contains main(), whose standard responsibility is simply to create the NXApp instance, load the main nib section, and start the run loop. Locus doesn't use the default main file generated by ProjectBuilder, because this main() also has an additional responsibility: it checks all the command-line arguments, look for one that says "DEBUGGING". If it is found, the global variable DEBUGGING is turned on. This is used in development to make Locus behave differently when run for testing purposes. Of course, most people do this with #ifdef DEBUG ... style constructs, but I'm not fond of having lots of #ifdef's in my code, so I din't it another way. I also think this method is more convenient to use as you don't have to worry about compiling a separate debug and non-debug version. It would probably be a good idea at some point to put an #ifdef around the code in here that checks for this, so that you could compile a version which will not ever check for this option.
Original Author: Jeremy Slade
Revision History:
Created
V.101 JGS Tue Apr 20 20:47:38 PDT 1993
*/
#import "CustomApp.h"
#import "Globals.h"
void main(int argc, char *argv[])
{
int i;
// Check for DEBUGGING setting
DEBUGGING = NO;
for ( i=1; i<NXArgc; i++ ) if ( !strcasecmp ( NXArgv[i], "DEBUGGING" ) ) {
DEBUGGING = YES;
break;
}
// Do standard stuff for main():
[CustomApp new];
if ([NXApp loadNibSection:"Main.nib" owner:NXApp withNames:NO])